package xdj.android.personal.namespace.utils;

import xdj.android.personal.R;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class MessageDilaogUtil
{
	public static void showDialog(Context c, String msg)
	{
		AlertDialog.Builder builder = new AlertDialog.Builder(c);
		String titleString = c.getResources().getString(R.string.Message_Title);
		String okString = c.getResources().getString(R.string.Message_OK);
		AlertDialog dialog = builder
				.setTitle(titleString)
				.setMessage(msg)
				.setCancelable(false)
				.setPositiveButton(okString,
						new DialogInterface.OnClickListener()
						{

							public void onClick(DialogInterface dialog,
									int which)
							{
								// TODO Auto-generated method stub

							}
						}).create();
		dialog.show();

	}

	public static void showDialog(Context c, String msg,
			DialogInterface.OnClickListener OkClickListener)
	{
		AlertDialog.Builder builder = new AlertDialog.Builder(c);
		String titleString = c.getResources().getString(R.string.Message_Title);
		String okString = c.getResources().getString(R.string.Message_OK);
		AlertDialog dialog = builder.setTitle(titleString).setMessage(msg)
				.setCancelable(false)
				.setPositiveButton(okString, OkClickListener).create();
		dialog.show();

	}
}
